import request from "@/utils/request";
/*****************  部门管理  *******************/
// 列表
export function deptList(params) {
  return request({
    url: "/dept",
    headers: {
      isToken: false,
    },
    method: "get",
    params,
  });
}
// 新增
export function deptAdd(params) {
  return request({
    url: "/dept",
    headers: {
      isToken: false,
    },
    method: "post",
    data: params,
  });
}
// 修改
export function deptEdit(id: number, params) {
  return request({
    url: `/dept/${id}`,
    headers: {
      isToken: false,
    },
    method: "patch",
    data: params,
  });
}
// 删除
export function deptDel(id) {
  return request({
    url: `/dept/${id}`,
    headers: {
      isToken: false,
    },
    method: "delete",
  });
}
// 详情
export function deptInfo(id) {
  return request({
    url: `/dept/${id}`,
    headers: {
      isToken: false,
    },
    method: "get",
  });
}
